﻿USE [master]
GO
/****** Object:  Database [CAR_LOAN]    Script Date: 12/23/2013 01:15:28 ******/
CREATE DATABASE [CAR_LOAN] ON  PRIMARY 
( NAME = N'CAR_LOAN', FILENAME = N'D:\DATABASE\CAR_LOAN.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'CAR_LOAN_log', FILENAME = N'D:\DATABASE\CAR_LOAN_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [CAR_LOAN] SET COMPATIBILITY_LEVEL = 100
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [CAR_LOAN].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [CAR_LOAN] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [CAR_LOAN] SET ANSI_NULLS OFF
GO
ALTER DATABASE [CAR_LOAN] SET ANSI_PADDING OFF
GO
ALTER DATABASE [CAR_LOAN] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [CAR_LOAN] SET ARITHABORT OFF
GO
ALTER DATABASE [CAR_LOAN] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [CAR_LOAN] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [CAR_LOAN] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [CAR_LOAN] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [CAR_LOAN] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [CAR_LOAN] SET CURSOR_DEFAULT  GLOBAL
GO
ALTER DATABASE [CAR_LOAN] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [CAR_LOAN] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [CAR_LOAN] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [CAR_LOAN] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [CAR_LOAN] SET  DISABLE_BROKER
GO
ALTER DATABASE [CAR_LOAN] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [CAR_LOAN] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [CAR_LOAN] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [CAR_LOAN] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [CAR_LOAN] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [CAR_LOAN] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [CAR_LOAN] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [CAR_LOAN] SET  READ_WRITE
GO
ALTER DATABASE [CAR_LOAN] SET RECOVERY SIMPLE
GO
ALTER DATABASE [CAR_LOAN] SET  MULTI_USER
GO
ALTER DATABASE [CAR_LOAN] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [CAR_LOAN] SET DB_CHAINING OFF
GO
USE [CAR_LOAN]
GO
/****** Object:  Table [dbo].[ALERTS_MESSAGE]    Script Date: 12/23/2013 01:15:32 ******/
DROP TABLE [dbo].[ALERTS_MESSAGE]
GO
/****** Object:  Table [dbo].[APPOINTMENTS]    Script Date: 12/23/2013 01:15:31 ******/
DROP TABLE [dbo].[APPOINTMENTS]
GO
/****** Object:  Table [dbo].[CAR_BRAND]    Script Date: 12/23/2013 01:15:31 ******/
DROP TABLE [dbo].[CAR_BRAND]
GO
/****** Object:  Table [dbo].[CAR_INFO]    Script Date: 12/23/2013 01:15:31 ******/
DROP TABLE [dbo].[CAR_INFO]
GO
/****** Object:  Table [dbo].[CAR_MODEL]    Script Date: 12/23/2013 01:15:31 ******/
DROP TABLE [dbo].[CAR_MODEL]
GO
/****** Object:  Table [dbo].[CUSTOMER]    Script Date: 12/23/2013 01:15:31 ******/
DROP TABLE [dbo].[CUSTOMER]
GO
/****** Object:  Table [dbo].[CUSTOMER_DEBT]    Script Date: 12/23/2013 01:15:31 ******/
DROP TABLE [dbo].[CUSTOMER_DEBT]
GO
/****** Object:  Table [dbo].[DEBT_DETAIL]    Script Date: 12/23/2013 01:15:31 ******/
DROP TABLE [dbo].[DEBT_DETAIL]
GO
/****** Object:  Table [dbo].[DEBT_INFO]    Script Date: 12/23/2013 01:15:31 ******/
DROP TABLE [dbo].[DEBT_INFO]
GO
/****** Object:  Table [dbo].[DOWN_PAYMENT_INFO]    Script Date: 12/23/2013 01:15:31 ******/
DROP TABLE [dbo].[DOWN_PAYMENT_INFO]
GO
/****** Object:  Table [dbo].[EMPLOYEE]    Script Date: 12/23/2013 01:15:31 ******/
DROP TABLE [dbo].[EMPLOYEE]
GO
/****** Object:  Table [dbo].[INTERREST_INFO]    Script Date: 12/23/2013 01:15:31 ******/
DROP TABLE [dbo].[INTERREST_INFO]
GO
/****** Object:  Table [dbo].[LITIGATION_DETAIL]    Script Date: 12/23/2013 01:15:30 ******/
DROP TABLE [dbo].[LITIGATION_DETAIL]
GO
/****** Object:  Table [dbo].[LITIGATION_INFO]    Script Date: 12/23/2013 01:15:30 ******/
DROP TABLE [dbo].[LITIGATION_INFO]
GO
/****** Object:  Table [dbo].[LOAN]    Script Date: 12/23/2013 01:15:30 ******/
DROP TABLE [dbo].[LOAN]
GO
/****** Object:  Table [dbo].[PAYMENTS]    Script Date: 12/23/2013 01:15:30 ******/
DROP TABLE [dbo].[PAYMENTS]
GO
/****** Object:  Table [dbo].[SCHEDULE]    Script Date: 12/23/2013 01:15:30 ******/
DROP TABLE [dbo].[SCHEDULE]
GO
/****** Object:  Table [dbo].[SEQUESTER]    Script Date: 12/23/2013 01:15:30 ******/
DROP TABLE [dbo].[SEQUESTER]
GO
/****** Object:  Table [dbo].[SEQUESTER]    Script Date: 12/23/2013 01:15:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SEQUESTER](
	[SEQUESTER_ID] [int] IDENTITY(1,1) NOT NULL,
	[LOAN_ID] [int] NULL,
	[CAR_PRICE] [int] NULL,
	[SEQUESTER_DATE] [date] NULL,
	[SEQUESTER_STATUS] [char](1) NULL,
 CONSTRAINT [PK_SEQUESTER] PRIMARY KEY CLUSTERED 
(
	[SEQUESTER_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[SCHEDULE]    Script Date: 12/23/2013 01:15:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SCHEDULE](
	[SCHEDULE_ID] [int] IDENTITY(1,1) NOT NULL,
	[LOAN_ID] [int] NULL,
	[EMPLOYEE_ID] [int] NULL,
	[SCHEDULE_JOB] [char](1) NULL,
	[SCHEDULE_STATUS] [char](1) NULL,
 CONSTRAINT [PK_SCHEDULE] PRIMARY KEY CLUSTERED 
(
	[SCHEDULE_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[PAYMENTS]    Script Date: 12/23/2013 01:15:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[PAYMENTS](
	[PAYMENTS_ID] [varchar](9) NOT NULL,
	[LOAN_ID] [int] NULL,
	[EMPLOYEE_ID] [int] NULL,
	[PAYMENTS_DUE_DATE] [date] NULL,
	[PAYMENTS_DATE] [date] NULL,
	[PAYMENTS_STATUS] [char](1) NULL,
 CONSTRAINT [PK_PAYMENTS] PRIMARY KEY CLUSTERED 
(
	[PAYMENTS_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[LOAN]    Script Date: 12/23/2013 01:15:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[LOAN](
	[LOAN_ID] [int] IDENTITY(1,1) NOT NULL,
	[CAR_ID] [int] NULL,
	[INTERREST_DETAIL_ID] [int] NULL,
	[DOWN_PAYMENT_ID] [int] NULL,
	[CUSTOMER_ID] [int] NULL,
	[VEHICLE_ID] [varchar](10) NULL,
	[LOAN_DATE] [date] NULL,
	[LOAN_SUCCESS_DATE] [date] NULL,
	[DOWN_PAYMENT] [decimal](18, 2) NULL,
	[PAY_MONTH] [decimal](18, 2) NULL,
	[DEBT_MONTH_REST] [decimal](18, 2) NULL,
	[PRINCIPLE] [decimal](18, 2) NULL,
	[LOAN_STATUS] [char](1) NULL,
	[DEBT_STATUS] [char](1) NULL,
 CONSTRAINT [PK_LOAN] PRIMARY KEY CLUSTERED 
(
	[LOAN_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[LITIGATION_INFO]    Script Date: 12/23/2013 01:15:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[LITIGATION_INFO](
	[LITIGATION_ID] [int] IDENTITY(1,1) NOT NULL,
	[LOAN_ID] [int] NULL,
	[EMPLOYEE_ID] [int] NULL,
	[LITIGATION_STATUS] [char](1) NULL,
 CONSTRAINT [PK_LITIGATION_INFO] PRIMARY KEY CLUSTERED 
(
	[LITIGATION_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[LITIGATION_DETAIL]    Script Date: 12/23/2013 01:15:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[LITIGATION_DETAIL](
	[LITIGATION_DETAIL_ID] [int] IDENTITY(1,1) NOT NULL,
	[LITIGATION_ID] [int] NULL,
	[LITIGATION_DETAIL] [varchar](2500) NULL,
	[LITIGATION_DETAIL_DATE] [date] NULL,
 CONSTRAINT [PK_LITIGATION_DETAIL] PRIMARY KEY CLUSTERED 
(
	[LITIGATION_DETAIL_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[INTERREST_INFO]    Script Date: 12/23/2013 01:15:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[INTERREST_INFO](
	[INTERREST_ID] [int] IDENTITY(1,1) NOT NULL,
	[INTERREST_RATE] [decimal](18, 2) NULL,
	[DEBT_MONTH] [int] NULL,
	[DOWN_ID] [int] NULL,
 CONSTRAINT [PK_INTERREST_INFO] PRIMARY KEY CLUSTERED 
(
	[INTERREST_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[EMPLOYEE]    Script Date: 12/23/2013 01:15:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[EMPLOYEE](
	[EMPLOYEE_ID] [int] IDENTITY(1,1) NOT NULL,
	[EMPLOYEE_NAME] [varchar](100) NULL,
	[EMPLOYEE_LASTNAME] [varchar](100) NULL,
	[EMPLOYEE_AGE] [int] NULL,
	[EMPLOYEE_TEL] [varchar](12) NULL,
	[EMPLOYEE_PERSONAL_ID] [char](13) NULL,
	[EMPLOYEE_POSITION] [char](1) NULL,
	[EMPLOYEE_GROUP] [char](2) NULL,
	[USERNAME] [varchar](50) NULL,
	[PASSWORD] [varchar](50) NULL,
 CONSTRAINT [PK_EMPLOYEE_1] PRIMARY KEY CLUSTERED 
(
	[EMPLOYEE_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[DOWN_PAYMENT_INFO]    Script Date: 12/23/2013 01:15:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DOWN_PAYMENT_INFO](
	[DOWN_PAYMENT_ID] [int] IDENTITY(1,1) NOT NULL,
	[DOWN_PAYMENT_RATE] [int] NULL,
 CONSTRAINT [PK_DOWN_PAYMENT_INFO] PRIMARY KEY CLUSTERED 
(
	[DOWN_PAYMENT_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[DEBT_INFO]    Script Date: 12/23/2013 01:15:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DEBT_INFO](
	[DEBT_ID] [int] IDENTITY(1,1) NOT NULL,
	[LOAN_ID] [int] NULL,
	[EMPLOYEE_ID] [int] NULL,
	[DEBT_STATUS] [char](1) NULL,
 CONSTRAINT [PK_Table_1] PRIMARY KEY CLUSTERED 
(
	[DEBT_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[DEBT_DETAIL]    Script Date: 12/23/2013 01:15:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DEBT_DETAIL](
	[DEBT_DETAIL_ID] [int] IDENTITY(1,1) NOT NULL,
	[DEBT_ID] [int] NULL,
	[DEBT_DETAIL] [varchar](2500) NULL,
	[DEBT_DETAIL_DATE] [date] NULL,
 CONSTRAINT [PK_DEBT_DETAIL] PRIMARY KEY CLUSTERED 
(
	[DEBT_DETAIL_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CUSTOMER_DEBT]    Script Date: 12/23/2013 01:15:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CUSTOMER_DEBT](
	[CUSTOMER_DEBT_ID] [int] IDENTITY(1,1) NOT NULL,
	[DEBT_DETAIL] [varchar](255) NULL,
	[DEBT_AMOUNT] [int] NULL,
	[CUSTOMER_ID] [int] NOT NULL,
 CONSTRAINT [PK_CUSTOMER_DEBT] PRIMARY KEY CLUSTERED 
(
	[CUSTOMER_DEBT_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CUSTOMER]    Script Date: 12/23/2013 01:15:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CUSTOMER](
	[CUSTOMER_ID] [int] IDENTITY(1,1) NOT NULL,
	[CUSTOMER_NAME] [varchar](100) NULL,
	[CUSTOMER_LASTNAME] [varchar](100) NULL,
	[CUSTOMER_PERSONAL_ID] [char](13) NULL,
	[CUSTOMER_AGE] [int] NULL,
	[CUSTOMER_TEL] [varchar](12) NULL,
	[CUSTOMER_ADDRESS] [varchar](255) NULL,
	[CUSTOMER_SARARY] [int] NULL,
	[CUSTOMER_WORK_ADDRESS] [varchar](255) NULL,
	[CUSTOMER_WORK_TEL] [varchar](12) NULL,
	[CUSTOMER_JOB] [varchar](100) NULL,
	[CUSTOMER_BLACK_LIST] [char](1) NULL,
	[USERNAME] [varchar](50) NULL,
	[PASSWORD] [varchar](50) NULL,
 CONSTRAINT [PK_CUSTOMER] PRIMARY KEY CLUSTERED 
(
	[CUSTOMER_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CAR_MODEL]    Script Date: 12/23/2013 01:15:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CAR_MODEL](
	[CAR_MODEL_ID] [int] IDENTITY(1,1) NOT NULL,
	[CAR_BRAND_ID] [int] NOT NULL,
	[CAR_MODEL_NAME] [varchar](250) NULL,
 CONSTRAINT [PK_CAR_MODEL] PRIMARY KEY CLUSTERED 
(
	[CAR_MODEL_ID] ASC,
	[CAR_BRAND_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CAR_INFO]    Script Date: 12/23/2013 01:15:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CAR_INFO](
	[CAR_ID] [int] IDENTITY(1,1) NOT NULL,
	[CAR_TYPE_ENGINE] [varchar](100) NULL,
	[CAR_DETAIL] [varchar](2500) NULL,
	[CAR_PRICE] [decimal](18, 2) NULL,
	[CAR_BRAND_ID] [int] NULL,
	[CAR_MODEL_ID] [int] NULL,
	[CAR_PATH_IMAGE] [varchar](1000) NULL,
 CONSTRAINT [PK_CAR_INFO] PRIMARY KEY CLUSTERED 
(
	[CAR_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CAR_BRAND]    Script Date: 12/23/2013 01:15:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CAR_BRAND](
	[CAR_BRAND_ID] [int] IDENTITY(1,1) NOT NULL,
	[CAR_BRAND_NAME] [varchar](250) NULL,
 CONSTRAINT [PK_CAR_BRAND] PRIMARY KEY CLUSTERED 
(
	[CAR_BRAND_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[APPOINTMENTS]    Script Date: 12/23/2013 01:15:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[APPOINTMENTS](
	[APPOINTMENTS_ID] [int] IDENTITY(1,1) NOT NULL,
	[LOAN_ID] [int] NULL,
	[APPOINTMENTS_DATE] [date] NULL,
	[APPOINTMENTS_START_TIME] [char](5) NULL,
	[APPOINTMENTS_END_TIME] [char](5) NULL,
 CONSTRAINT [PK_APPOINTMENTS] PRIMARY KEY CLUSTERED 
(
	[APPOINTMENTS_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[ALERTS_MESSAGE]    Script Date: 12/23/2013 01:15:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ALERTS_MESSAGE](
	[ALERTS_MESSAGE_ID] [varchar](9) NOT NULL,
	[ALERTS_MESSAGE_DETAIL] [varchar](250) NULL,
	[ALERTS_MESSAGE_STATUS] [char](1) NULL,
	[USERNAME] [varchar](50) NULL,
 CONSTRAINT [PK_ALERTS_MESSAGE] PRIMARY KEY CLUSTERED 
(
	[ALERTS_MESSAGE_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
